The recent years with the proleferation of personal computers there has been widespread use of recording and reproducing apparatuses, such as hard disk drives and magneto-optic disk drives, for their large capacities and high speeds as external storage apparatus. As computer software of larger volumes are used and data to be handled is of large volume, the speeds and the capacities of these recording and reproducing apparatuses used as external storage apparatus have substantially increased.
In this manner, recording and reproducing apparatus which typically handle computer data is now also used with a digital AV apparatus for recording and reproducing video and audio data (hereinafter referred to as “AV data”) making use of their large capacities and high speed.
When data, in a computer program are to be recorded in a recording and reproducing apparatus, an error of even one bit causes a serious problem such as a program malfunctions. Hence, recording and reproducing apparatus execute a strict error check at the time of recording and reproducing of computer data, to thereby guarantee the reliability of data, a program, etc.
Such error checks include (1) re-allocation processing of re-allocating an LBA (Logical Block Address) to a sector in a recording medium, (2) retry processing of recording in or reading from a sector in which there is an error, (3) replacement processing of allocating an LBA allocated to an error-bound sector to other sector within a replacement area and (4) suspending use of the error-bound sector, etc.
On the other hand, when AV data are to be recorded in a recording and reproducing apparatus, it is important while recording or reproducing to ensure that AV data will remain continuous so that the continuity of the AV data, rather than the reliability of the data, will be guaranteed.
In other words, when AV data are to be reproduced, if an error occurs in 1-byte data for instance, most of the audience will not notice when such AV data are displayed on a television monitor.
However, when a strict error check such as retry processing and replacement processing is executed during reproduction of the AV data, the reproduction of the AV data will be interrupted by the error check and images displayed on the television monitor will accordingly be chopped, which is very disturbing to the audience.
FIG. 13 shows a proposed recording and reproducing apparatus 40 which records and reproduces while guaranteeing the continuity of AV data.
The recording and reproducing apparatus 40 is comprised of an HDD 41, an AV recording/reproducing HDD controller 43, a replacement DAU table 42, a file system 4, a recording buffer 8 and a play buffer 9.
FIG. 14 shows a magnetic disk medium 44 which the HDD 41 writes and reads AV data in and from.
In the magnetic disk medium 44, there are an AV data recording area 47 and a replacement DAU area 46. In short, the AV data recording area 47 is an area for writing AV data in disk access units which are the minimum units for continuously accessing the magnetic disk medium 44, whereas the replacement DAU area 46 is an area in which a disk access unit is secured in advance which will be used to write AV data instead of a defective or otherwise inappropriate disk access unit within the AV data recording area 47 if it is not possible to write normally in the defective disk access unit. Thus, the recording and reproducing apparatus 40 executes replacement processing of a disk access unit of writing AV data in the disk access unit secured within the replacement DAU area 46 as a substitution for a disk access unit within the AV data recording area 47.
Further, when the sizes of the disk access units become small, the HDD 41 is sought for and forced on rotation stand-by frequently, and therefore, a transfer rate for AV data slows down. Noting this, the sizes of the disk access units are made large enough so as to guarantee continuous transfer of AV data, and set to 2 Mbytes for example.
HDD 41 holds a table in which a notified LBA (Logical Block Address) is associated with a track number and a sector number which express a physical location in the magnetic disk medium 44 as shown in FIG. 17, and serves as means which specifies a physical location in the magnetic disk medium 44 utilizing this table, and then writes or read AV data.
The AV recording/reproducing HDD controller 43 controls the HDD 41. The replacement DAU table 42 identifys a post-replacement disk access unit number from a pre-replacement disk access unit number.
FIG. 15 shows an example of the replacement DAU table 42. A DAU number 51 is the number assigned to a disk access unit as it is before replacement processing, while a post-replacement DAU number 52 is the number assigned to a disk access unit as it is after replacement processing. Without replacement processing performed, the same number in the DAU number 51 is stored as the post-replacement DAU number 52.
The file system 4 is for handling AV data as a file and serves as means which holds file information, which contains information regarding disk access units which form files, designates file name and refers to the file information or updates the file information.
In addition, a DAU converting table 53 is stored in the file system 4 as shown in FIG. 16. The DAU converting table 53 is a table for converting a disk access unit number 54 assigned to specify a disk access unit into an LBA 55 which is at the top of a disk access unit within the magnetic disk medium 44.
The recording buffer 8 is a buffer which, upon transfer of AV data to be written in the magnetic disk medium 44, temporarily stores the AV data.
The play buffer 9 is a buffer which temporarily stores AV data which were read from the magnetic disk medium 44.
Operations of such a recording and reproducing apparatus 40 will now be described.
First, the recording and reproducing apparatus 40 formats the magnetic disk medium 44, prior to recording or reproduction of AV data in or from the magnetic disk medium 44. At the time of the formatting processing, the replacement DAU area 46 is also ensured separately from the AV data recording area 47.
Next, replacement processing is performed which is for replacing a disk access unit which is defective or requires a predetermined period of time or longer time for writing or reading with a disk access unit which is within the replacement DAU area 46 so as to guarantee real-time transfer of AV data.
That is, writing in a disk access unit or reading from a disk access unit within the magnetic disk medium 44, the AV recording/reproducing HDD controller 43 identifies a disk access unit which is defective or requires a predetermined period of time or longer time for writing or reading.
When identifying such a disk access unit, the AV recording/reproducing HDD controller 43 notifies the file system 4 of this.
Upon notification, the file system 4 rewrites the replacement DAU table 42. In short, the post-replacement DAU number 52 which corresponds to the number assigned to the disk access unit thus notified about is rewritten into the number assigned to a disk access unit which is within the replacement DAU area 46.
The processing above will then be repeated for all disk access units which are within the replacement DAU area 46.
When replacement processing is performed in the units of sectors, since a seek action and rotation stand-by occur in a sector which is under the replacement processing, writing and reading take an extra amount of time. Hence, replacement processing at smaller intervals than a size which guarantees continuous transfer of AV data makes it impossible to guarantee continuous transfer of the AV data because of seek, rotation stand-by, etc. On the contrary, the recording and reproducing apparatus 40, executing replacement processing in the units of disk access units whose sizes guarantees continuous transfer of AV data, can guarantee the continuity of the AV data even at the time of replacement processing.
In this manner, the recording and reproducing apparatus 40 performs replacement processing in the units of disk access units in advance and therefore guarantees transfer of AV data in real time.
Recording of AV data in the magnetic disk medium 44 will now be described.
AV data received by a television tuner or the like are transferred to the recording and reproducing apparatus 40 in real time.
The recording buffer 8 temporarily records the AV data thus transferred in real time.
Storing the AV data amounting to a disk access unit, the recording buffer 8 notifies the AV recording/reproducing HDD controller 43 of that.
Notified by the recording buffer 8 of the storage of the AV data amounting to a disk access unit, the AV recording/reproducing HDD controller 43 demands the file system 4 to tell in which disk access unit the AV data will be written.
In response, the file system 4 checks, from the file information, the number assigned to a disk access unit in which AV data are to be written, and using the replacement DAU table 42 shown in FIG. 15, converts the disk access unit number 51 into the post-replacement DAU number 52. In the event that the disk access unit in which AV data are to be written has been replaced because of a defect or the like, the disk access unit number of the replacement DAU area 46 is written as the post-replacement DAU number 52. In the event that no replacement processing is performed, the number which is the same as the number assigned to the disk access unit in which AV data are to be written is written as the post-replacement DAU number 52. The number assigned to the replaced disk access unit is then reported to the AV recording/reproducing HDD controller 43. Hence, of the disk access units within the AV data recording area 47, a disk access unit which is defective or requires a predetermined period of time or longer time for writing or reading is not used.
Notified by the file system 4 of the number assigned to the replaced disk access unit to which AV data is written, the AV recording/reproducing HDD controller 43 demands for notification of the top LBA of thus notified disk access unit number.
Upon receipt of the demand from the AV recording/reproducing HDD controller 43, the file system 4 identifies the disk access unit number and the LBA at the top of the disk access unit denoted as the top LBA 55 while referring to the DAU converting table 53 which is shown in FIG. 16, and notifies the AV recording/reproducing HDD controller 43 of the same.
Further, the AV recording/reproducing HDD controller 43 demands the recording buffer 8 to transfer AV data to be written in one disk access unit.
In response, the recording buffer 8 transfers AV data to be written in one disk access unit to the AV recording/reproducing HDD controller 43.
The AV recording/reproducing HDD controller 43 designates, from the notified LBA, the number of sectors in which AV data are to be written, issues a write command to the file system 4, and transfers the AV data transferred from the recording buffer 8 to the HDD 41.
The file system 4 provides the HDD 41 with the write command sent from the AV recording/reproducing HDD controller 43.
The HDD 41 converts the notified LBA into a track number and a sector number with reference to the table which is shown in FIG. 17, and writes the transferred AV data in a sector which forms a corresponding track which is in the magnetic disk medium 44.
Meanwhile, AV data are transferred to the recording buffer 8 in real time, and the recording buffer 8, upon storing the AV data amounting to a disk access unit, notifies the AV recording/reproducing HDD controller 43 of that. Operations similar to the above will then be repeated, thereby recording the AV data transferred in real time. This prevents use of a disk access unit which will not see a termination of recording of AV data even after a predetermined period of time or longer time due to a defect or the like, and therefore, it is possible to guarantee real-time transfer of AV data.
Reading of AV data from the magnetic disk medium 44 will now be described.
The play buffer 9 outputs AV data in real time, and when a free space is created which amounts to a disk access unit, notifies the AV recording/reproducing HDD controller 43 of that.
Notified from the play buffer 9, the AV recording/reproducing HDD controller 43 demands the file system 4 for the number assigned to a disk access unit which is to be read out next.
In response, the file system 4 checks from the file information the number assigned to a disk access unit in which AV data are to be written, and converts the disk access unit number 51 into the post-replacement DAU number 52 with reference to the replacement DAU table 42. Hence, a defective disk access unit will not be used. The AV recording/reproducing HDD controller 43 is then notified of the number assigned to a replaced disk access unit.
When notified by the file system 4 of the number assigned to the disk access unit in which AV data are to be written, the AV recording/reproducing HDD controller 43 makes an inquiry regarding the top LBA of the disk access unit thus reported to the file system 4.
Receiving the inquiry from the AV recording/reproducing HDD controller 43, the file system 4 notifies the AV recording/reproducing HDD controller 43 of the top LBA of the disk access unit.
The AV recording/reproducing HDD controller 43, upon notification by the file system 4 of the notified LBA, designates the LBA and the number of sectors in which the AV data are to be read out and issues a read command to the file system 4.
The file system 4 relays the read command sent from the AV recording/reproducing HDD controller 43 to the HDD 41.
The HDD 41 converts the notified LBA into a track number and a sector number with reference to the table which is shown in FIG. 17, and reads the AV data from the sectors which form a corresponding track which is in the magnetic disk medium 44 and transfers to the AV recording/reproducing HDD controller 43.
The AV recording/reproducing HDD controller 43 transfers thus read AV data to the play buffer 9.
The play buffer 9 stores the AV data read by the AV recording/reproducing HDD controller 43 and outputs stored AV data in real time.
Hence, since the sizes of the disk access units are made large enough so as to continuously transfer AV data, and further, since a disk access unit which is within the replacement DAU area 46 is used instead of a defective disk access unit, the recording and reproducing apparatus 40 guarantees continuous transfer of the AV data.
However, requiring to execute replacement processing of a disk access unit in advance in order to guarantee continuous transfer of AV data, the conventional recording and reproducing apparatus 40 needs labor and time.
That is, it is necessary to execute replacement processing of a disk access unit for the purpose of continuously transferring AV data, which gives rise to a problem that it takes labor and time (first problem).
Further, at the time of replacement processing, reading and writing are executed in the entire magnetic disk medium 44 in order to find a defect in a disk access unit or a disk access unit which requires a predetermined period of time or longer time for writing or reading, and hence, AV data already recorded in the magnetic disk medium 44 get deleted.
In other words, there is a problem (second problem) that replacement processing of a disk access unit executed for the purpose of continuously transferring AV data causes deletion of AV data which were previously recorded in a recording medium.
In addition, for execution of replacement processing of a disk access unit, it is necessary to secure a disk access unit in the magnetic disk medium 44 which will serve as a substitute like the replacement DAU area 46. Because of this, an area such as the AV data recording area 47 in which a user-can freely record AV data decreases.
That is, there is a problem (third problem) that for execution of replacement processing of a disk access unit for the purpose of guaranteeing continuous transfer of AV data without a break, it is necessary to secure in advance a disk access unit which will serve as a substitute, and hence, as compared with where replacement processing is not carried out, an area which a user can freely use decreases.
Further, in the event that there is disturbance such as vibrations, even though there is not a defect in a disk access unit within the magnetic disk medium 44, the disk access unit will be determined defective. Until re-formatting, the disk access unit will be treated as a defective disk access unit.
That is, there is a problem (fourth problem) that when there is disturbance such as vibrations, even a disk access unit having no defect is determined as a defective disk access unit and will be treated as a defective disk access unit until the recording medium has been formatted.